﻿
<?php
	include("pub.php"); 
	include(__ROOT__."/db.php");
	
	function select($arg)
	{
		//$var_t = $arg;
		$sql = "select * from ".$arg;
		//$sql = "select * from t_year";
		echo $sql;
		$data = mysql_query($sql, $conn);
		
		while ($arr = mysql_fetch_array($data))
		{
			echo "<option value=".$arr[$var_t].">".$arr[$arg]."</option>";
		}
		
	}
	/*
	function foo()
	{
		echo "hello<br />";
	}*/
	
	//foo();
	select("t_year");
?>

